<?php
$base_url = site_url();
?>

<input type="hidden" id="base_url" value="<?php echo $base_url; ?>" />
<table class="table table-striped" id="liste_unites">
    <thead>
        <t>
            <th>Identifiant</th>
            <th>Nom</th>
            <th>Code</th>
            <th><a href="<?php echo $base_url.'unite/create'; ?>" class="btn create">Créer</a></th>
        </tr>
    </thead>
    <tbody>
        <?php
        foreach ($unites as $key => $unite) {
            $url_Update = $base_url.'unite/update?UNITE_ID='.$unite->UNITE_ID;
            $url_Delete = $base_url.'unite/delete?UNITE_ID='.$unite->UNITE_ID;
            ?>
            <tr id="<?php echo $unite->UNITE_ID; ?>">
                <td><?php echo $unite->UNITE_ID; ?></td>
                <td><?php echo $unite->UNITE_LIBELLE; ?></td>
                <td><?php echo $unite->UNITE_CODE; ?></td>
                <td><a href="<?php echo $url_Update; ?>" class="btn update">Mettre à jour</a><a href="<?php echo $url_Delete; ?>" class="btn delete">Supprimer</a></td>
            </tr>
            <tr class="subgrid" style="display:none;">
                <td colspan="3"></td>
            </tr>
            <?php
        }
        ?>
    </tbody>
</table>

<div id="EditUnite"></div>

<div id="DeleteUnite">
  <p><span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>Êtes-vous sur de vouloir supprimer cet enregistrement ?</p>
</div>